{extend name="public/base" /}
{block name="title"}首页{/block}

{block name="content"}
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="alert alert-danger alert-dismissible fade in" role="alert">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>名称：<?php if($post['company_name']){echo $post['company_name'];}else{echo '未设置';} ?> <small style="color:#f60;">[<?php echo $post['status_text']; ?>]</small></h4>
                <p>
                    <a href="{:url('shop/Shop/setting')}"><button type="button" class="btn btn-danger">去设置</button></a>
                    <a href="{:url('shop/Article/add')}"><button type="button" class="btn btn-info">添加文章</button></a>
                    <a href="{:url('shop/Goods/add')}"><button type="button" class="btn btn-warning">添加商品</button></a>
                    <a href="{:url('shop/Slide/index')}"><button type="button" class="btn btn-success">轮播图</button></a>
                    <!-- <button type="button" class="btn btn-success" onclick="create_qrcode()">生成小程序码</button> -->
                    <button type="button" class="btn btn-default" data-dismiss="alert">暂时关闭</button>
                </p>
            </div>
        </div>
        <div class="col-md-4">
            <div class="panel panel-default">
                <div class="panel-heading">基本信息</div>
                <div class="panel-body">
                    <ul class="list-group">
                        <li class="list-group-item">联系人：<span class="glyphicon glyphicon-user"></span>&nbsp;&nbsp;{$post['contact']|default="-"} <span style="color:#999;">{$post['zhiwu']}</span></li>
                        <li class="list-group-item">联系方式：<span class="glyphicon glyphicon-earphone"></span>&nbsp;&nbsp;{$post['contact_information']|default="-"}</li>
                        <li class="list-group-item">网址：{$post['website']|default="-"}</li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="col-md-8">
            <div class="panel panel-default">
                <div class="panel-heading">我的位置</div>
                <div class="panel-body">
                    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=2658c9ccf1a7c8762bf6413614e25c21&s=1"></script>
                    <div id="allmap"></div>
                    <script type="text/javascript">
                        // 百度地图API功能
                        var map = new BMap.Map("allmap");
                        <?php if($post['point_lng']){ ?>
                        var point = new BMap.Point(<?php echo $post['point_lng']; ?>,<?php echo $post['point_lat']; ?>);
                        <?php }else{ ?>
                        var point = '厦门市';
                        <?php } ?>
                        map.centerAndZoom(point,12);
                        var marker = new BMap.Marker(point);// 创建标注
                        map.addOverlay(marker);             // 将标注添加到地图中
                        map.enableScrollWheelZoom();   //启用滚轮放大缩小，默认禁用
                        map.enableContinuousZoom();    //启用地图惯性拖拽，默认禁用
                    </script>
                    <style type="text/css">
                        #allmap {width:100%;height:300px;overflow:hidden;margin:0;font-family:"微软雅黑";}
                    </style>
                </div>
            </div>
        </div>
        <!-- <div class="col-md-6">
            <div class="panel panel-default">
                <div class="panel-heading">服务器状态</div>
                <div class="panel-body">
                    <p>内存使用率：40%</p>
                    <div class="progress">
                        <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%"></div>
                    </div>
                    <p>数据库使用率：20%</p>
                    <div class="progress">
                        <div class="progress-bar progress-bar-info progress-bar-striped" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%"></div>
                    </div>
                    <p>磁盘使用率：60%</p>
                    <div class="progress">
                        <div class="progress-bar progress-bar-warning progress-bar-striped" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%"></div>
                    </div>
                    <p>CPU使用率：80%</p>
                    <div class="progress">
                        <div class="progress-bar progress-bar-danger progress-bar-striped" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="panel panel-default">
                <div class="panel-heading">今日访客统计</div>
                <div class="panel-body">
                    <canvas id="canvas" class="col-md-12"></canvas>
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">团队留言板</div>
                <div class="panel-body">
                    <div class="col-md-7">
                        <div class="media well">
                            <div class="media-left">
                                <a href="#">
                                    <img class="media-object wh64" src="images/a.png" alt="卓大哥">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading">卓大哥</h4>
                                技术大哥，今晚请把网站程序升级一下哈，现在的系统有漏洞，安全起见！
                            </div>
                        </div>
                        <div class="media well">
                            <div class="media-body text-right">
                                <h4 class="media-heading">技术大哥</h4>
                                收到，今晚凌晨2点准时升级！
                            </div>
                            <div class="media-right">
                                <a href="#">
                                    <img class="media-object wh64" src="images/b.png" alt="技术大哥">
                                </a>
                            </div>
                        </div>
                        <div class="media well">
                            <div class="media-body text-right">
                                <h4 class="media-heading">技术大哥</h4>
                                你先在站点发布一下通知哈！
                            </div>
                            <div class="media-right">
                                <a href="#">
                                    <img class="media-object wh64" src="images/b.png" alt="技术大哥">
                                </a>
                            </div>
                        </div>
                        <div class="media well">
                            <div class="media-left">
                                <a href="#">
                                    <img class="media-object wh64" src="images/a.png" alt="卓大哥">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading">卓大哥</h4>
                                好嘞。
                            </div>
                        </div>
                    </div>
                    <div class="col-md-5">
                        <form action="#">
                            <div class="form-group">
                                <label for="text1">输入留言内容</label>
                                <textarea class="form-control" id="text1" rows="5" cols="10" placeholder="请输入留言内容"></textarea>
                                <button type="submit" class="btn btn-default mar_t15">留言</button>
                            </div>
                        </form>
                        <div class="panel panel-default">
                            <div class="panel-heading">团队联系手册</div>
                            <div class="panel-body">
                                <ul class="list-group">
                                    <li class="list-group-item">站长(李小龙)：<span class="glyphicon glyphicon-phone"></span>&nbsp;&nbsp;13134848615</li>
                                    <li class="list-group-item">技术(大牛哥)：<span class="glyphicon glyphicon-phone"></span>&nbsp;&nbsp;13456127694</li>
                                    <li class="list-group-item">推广(张二哥)：<span class="glyphicon glyphicon-phone"></span>&nbsp;&nbsp;13457815482</li>
                                    <li class="list-group-item">客服(王女士)：<span class="glyphicon glyphicon-phone"></span>&nbsp;&nbsp;13134567782&nbsp;&nbsp;<span class="glyphicon glyphicon-phone-alt"></span>&nbsp;&nbsp;028-888888</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div> -->
    </div>
</div>

<script>
function create_qrcode()
{
    $.ajax({
        async:false,
        url:'<?php echo url('api/Image/getwxacodeunlimit'); ?>',
        data:{scene:'id=<?php echo $post['id']; ?>',page:'pages/home/pages/shop/index',type:0,shop_id:<?php echo $post['id']; ?>},
        type:"GET",
        dataType:"json",
        success: function(res){
            if(res.code==0)
            {
                alert('生成成功');
            }
            else
            {
                alert('生成失败');
            }
        }
    });
    
    location.href = "<?php echo url('Index/index'); ?>";
}
</script>
{/block}